package com.spvs.system;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import com.spvs.common.security.annotation.EnableCustomConfig;
import com.spvs.common.security.annotation.EnableRyFeignClients;
import com.spvs.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 系统模块
 *
 * @author supervision
 */
@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringBootApplication
@EnableTransactionManagement
public class SupervisionSystemApplication
{
    public static void main(String[] args)
    {
        SpringApplication.run(SupervisionSystemApplication.class, args);
        System.out.println("(♥◠‿◠)ﾉﾞ  系统模块启动成功   ლ(´ڡ`ლ)ﾞ");
    }


    @Bean
    public TaskScheduler taskScheduler() {
        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
        scheduler.setPoolSize(5);
        scheduler.setThreadNamePrefix("MyTaskScheduler-");
        scheduler.setDaemon(true);
        return scheduler;
    }
}
